package com.jjwxc.jwjskandriod.model;

import com.alibaba.fastjson.JSON;
import com.jjwxc.jwjskandriod.config.Constants;
import com.jjwxc.jwjskandriod.framework.utils.PreUtils;

import java.util.List;

public class LoginResponse {


    /**
     * code : 200
     * message : 操作成功
     * data : {"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcmluY2lwYWxJZCI6IjY0YzM4YmM4MjEzMTg5MGRkM2Y3OGI5NiIsImV4cCI6MTY5MDg3NTYyNiwidXNlcl9uYW1lIjoiMTM3NzQyNDQzNzgiLCJqdGkiOiJkNzA0MTNjNS02M2Y5LTQ3ZjQtOWIzOS0wNTZjMGQzNmE5MWYiLCJjbGllbnRfaWQiOiJwb3J0YWwtYXBwIiwic2NvcGUiOlsiYWxsIl19.WSMbabMIX7HIgehqARhoarrfFtk46_OBEt_buMA3eGN8fM1U17B_2yM6nQ9SNmpc2H7XWTsVJ6QiWuBoAzq_TAX8W3IXayNSmab9-nRqVsHAilcv3dvsBvM-wHCBg6LmPHsVWvL9Wm4t7FDRhoUTKvk_ULrkxRRKbkMPE9hrCQI","refreshToken":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiIxMzc3NDI0NDM3OCIsInNjb3BlIjpbImFsbCJdLCJhdGkiOiJkNzA0MTNjNS02M2Y5LTQ3ZjQtOWIzOS0wNTZjMGQzNmE5MWYiLCJwcmluY2lwYWxJZCI6IjY0YzM4YmM4MjEzMTg5MGRkM2Y3OGI5NiIsImV4cCI6MTY5MTM5NDAyNiwianRpIjoiMzUzMDg3MmYtNDVlYy00MjAzLTgyZDAtMjNiYmVjNGE1M2M4IiwiY2xpZW50X2lkIjoicG9ydGFsLWFwcCJ9.AEILu_58jroA6LMmb4LcMsP6k0D8xDm6SwZIbV3GiycdN6Gup4kt_i3HwpM6-yhlPwi1mhzMnLMIPpk0wrS1Ong1WgDMMV03IbnkAJ-hzVPKIiVSI_hKyAi4m9ZX6L7sa9G0jhw8llliXxcLfrnZzaE5hUMPuNLrQVqVHPIBLzk","tokenHead":"Bearer ","expiresIn":86399}
     */

    private int code;
    private String message;
    private DataBean data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * token : eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcmluY2lwYWxJZCI6IjY0YzM4YmM4MjEzMTg5MGRkM2Y3OGI5NiIsImV4cCI6MTY5MDg3NTYyNiwidXNlcl9uYW1lIjoiMTM3NzQyNDQzNzgiLCJqdGkiOiJkNzA0MTNjNS02M2Y5LTQ3ZjQtOWIzOS0wNTZjMGQzNmE5MWYiLCJjbGllbnRfaWQiOiJwb3J0YWwtYXBwIiwic2NvcGUiOlsiYWxsIl19.WSMbabMIX7HIgehqARhoarrfFtk46_OBEt_buMA3eGN8fM1U17B_2yM6nQ9SNmpc2H7XWTsVJ6QiWuBoAzq_TAX8W3IXayNSmab9-nRqVsHAilcv3dvsBvM-wHCBg6LmPHsVWvL9Wm4t7FDRhoUTKvk_ULrkxRRKbkMPE9hrCQI
         * refreshToken : eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiIxMzc3NDI0NDM3OCIsInNjb3BlIjpbImFsbCJdLCJhdGkiOiJkNzA0MTNjNS02M2Y5LTQ3ZjQtOWIzOS0wNTZjMGQzNmE5MWYiLCJwcmluY2lwYWxJZCI6IjY0YzM4YmM4MjEzMTg5MGRkM2Y3OGI5NiIsImV4cCI6MTY5MTM5NDAyNiwianRpIjoiMzUzMDg3MmYtNDVlYy00MjAzLTgyZDAtMjNiYmVjNGE1M2M4IiwiY2xpZW50X2lkIjoicG9ydGFsLWFwcCJ9.AEILu_58jroA6LMmb4LcMsP6k0D8xDm6SwZIbV3GiycdN6Gup4kt_i3HwpM6-yhlPwi1mhzMnLMIPpk0wrS1Ong1WgDMMV03IbnkAJ-hzVPKIiVSI_hKyAi4m9ZX6L7sa9G0jhw8llliXxcLfrnZzaE5hUMPuNLrQVqVHPIBLzk
         * tokenHead : Bearer
         * expiresIn : 86399
         */

        private String token;
        private String refreshToken;
        private String tokenHead;
        private int expiresIn;

        private BookCenterTabBean toTab;
        private List<BookCenterTabBean> tabs;

        public BookCenterTabBean getToTab() {
            return toTab;
        }

        public void setToTab(BookCenterTabBean toTab) {
            this.toTab = toTab;

            String value = JSON.toJSONString(toTab);
            PreUtils.setString(Constants.TAB_ITEM_SUGGEST_TO_TYPES, value);
        }

        public List<BookCenterTabBean> getTabs() {
            return tabs;
        }

        public void setTabs(List<BookCenterTabBean> tabs) {
            this.tabs = tabs;

            String value = JSON.toJSONString(tabs);
            PreUtils.setString(Constants.TAB_ITEM_SUGGEST_TYPES, value);
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public String getRefreshToken() {
            return refreshToken;
        }

        public void setRefreshToken(String refreshToken) {
            this.refreshToken = refreshToken;
        }

        public String getTokenHead() {
            return tokenHead;
        }

        public void setTokenHead(String tokenHead) {
            this.tokenHead = tokenHead;
        }

        public int getExpiresIn() {
            return expiresIn;
        }

        public void setExpiresIn(int expiresIn) {
            this.expiresIn = expiresIn;
        }

        public static class BookCenterTabBean {
            private String name;
            private String tabId;
            private String tabType;
            private String url;

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getTabId() {
                return tabId;
            }

            public void setTabId(String tabId) {
                this.tabId = tabId;
            }

            public String getTabType() {
                return tabType;
            }

            public void setTabType(String tabType) {
                this.tabType = tabType;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }
        }
    }
}
